//
//  ComposeTextView.swift
//  JGWB
//
//  Created by 付建国 on 2016/10/18.
//  Copyright © 2016年 sher. All rights reserved.
//

import UIKit
import SnapKit

class ComposeTextView: UITextView {
    
    lazy var placeHolderLabel : UILabel = UILabel()

    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        
        setupUI()
    }
    
    
}

extension ComposeTextView{
    fileprivate func setupUI(){
        
        addSubview(placeHolderLabel)
        
        placeHolderLabel.snp_makeConstraints { (make) in
            _ = make.top.equalTo(8)
            _ = make.left.equalTo(10)
            
        }
        
        placeHolderLabel.textColor = UIColor.lightGray
        placeHolderLabel.font = UIFont.systemFont(ofSize: 16)
        
        placeHolderLabel.text = "分享新鲜事..."
        //设置文字边距
        textContainerInset = UIEdgeInsetsMake(7, 7, 0, 7)
    }
}








